home *** CD-ROM | disk | FTP | other *** search
- #
- # Custom Control makefile
- #
- .SUFFIXES: .asm .c .def .VBX .h .lnk .map .obj .rc .res .sym
-
-
- PRODUCT = MHSAMPLE
- VBXNAME = MHSE200
- Default: AAUPDATE $(PRODUCT).VBX
-
- AAUPDATE:
- if exist MHSAMPLE.def del MHSAMPLE.def
- echo ;--------------------------------------------------------------------------------------------- >> MHSAMPLE.def
- echo ;MHSAMPLE.def - module definition file for MHSE200 custom control >> MHSAMPLE.def
- echo ;--------------------------------------------------------------------------------------------- >> MHSAMPLE.def
- echo ; >> MHSAMPLE.def
- echo LIBRARY MHSE200 >> MHSAMPLE.def
- echo EXETYPE WINDOWS >> MHSAMPLE.def
- echo DESCRIPTION 'Visual Basic MHSAMPLE custom control' >> MHSAMPLE.def
- echo ; >> MHSAMPLE.def
- echo CODE PRELOAD MOVEABLE DISCARDABLE >> MHSAMPLE.def
- echo DATA PRELOAD MOVEABLE SINGLE >> MHSAMPLE.def
- echo HEAPSIZE 1024 >> MHSAMPLE.def
- echo SEGMENTS >> MHSAMPLE.def
- echo WEP_TEXT FIXED >> MHSAMPLE.def
- echo EXPORTS
- echo IMPORTS >> MHSAMPLE.def
-
-
- #
- # Tools required
- #
- AS = masm
- CC = cl
- CVPACK = cvpack
- LINK = link
- MAPSYM = mapsym
- RC = $(RCPATH)rc
- #SZSCRN = echo
- SZSCRN = echo>con
-
-
- #
- # Flags
- #
- !IFNDEF NODEBUG
- #Debug build
- AFLAGS = -W2 -V -E -P -Zi
- CFLAGS = -W3 -c -G2csw -Alnw -Zip -Od -DVBT2
- LFLAGS = /co /align:16 /batch /far /li /map /nod /noe /nopackc /w
- RCFLAGS = -30
- !ELSE
- #Release Build
- !IFDEF RUN_TIME
- AFLAGS = -W2 -V -E -P
- CFLAGS = -W3 -c -G2csw -Alnw -Zp -DRUN_TIME -DVBT2
- LFLAGS = /align:16 /batch /far /li /nod /noe /nopackc /w
- RCFLAGS = -30 -DRUN_TIME
- !ELSE
- AFLAGS = -W2 -V -E -P
- CFLAGS = -W3 -c -G2csw -Alnw -Zp -DVBT2
- LFLAGS = /align:16 /batch /far /li /nod /noe /nopackc /w
- RCFLAGS = -30
- !ENDIF
- !ENDIF
-
- #
- # DEFAULT BUILD RULES
- #
- .c.obj:
- $(SZSCRN) Compiling $(<F)
- if exist $@ del $@
- $(CC) $(CFLAGS) $<
-
- .asm.obj:
- $(SZSCRN) Assembling $(<F)
- $(AS) $(AFLAGS) $<,$@;
-
-
- #
- # Dependencies
- #
-
- $(PRODUCT).obj: $(PRODUCT).c $(PRODUCT).h
-
- $(PRODUCT).VBX: $(PRODUCT).obj $(PRODUCT).lnk \
- $(PRODUCT).res $(PRODUCT).def
- $(SZSCRN) Linking $(PRODUCT).VBX...
- $(LINK) @$(PRODUCT).lnk
- #debug build
- !IFNDEF NODEBUG
- $(SZSCRN) CVPACKing $(PRODUCT).VBX...
- $(CVPACK) -p $(PRODUCT).VBX
- !ENDIF
- $(SZSCRN) RCing $(PRODUCT).VBX...
- $(RC) $(RCFLAGS) $(PRODUCT).res $(PRODUCT).VBX
- #debug build
- !IFNDEF NODEBUG
- $(SZSCRN) MAPSYMing $(PRODUCT).VBX...
- $(MAPSYM) $(PRODUCT)
- !ENDIF
-
- !IFNDEF NODEBUG
- copy $(PRODUCT).vbx $(VBXNAME)d.vbx
- !ELSE
- !IFDEF RUN_TIME
- copy $(PRODUCT).vbx $(VBXNAME).vbr
- !ELSE
- copy $(PRODUCT).vbx $(VBXNAME).vbx
- !ENDIF
- !ENDIF
- del $(PRODUCT).vbx
- $(SZSCRN) Done Linking $(PRODUCT).VBX
-
- $(PRODUCT).lnk: makefile
- $(SZSCRN) Making <<$(PRODUCT).lnk
- $(PRODUCT).obj
- $(PRODUCT).VBX $(LFLAGS)
- $(PRODUCT).map
- !IFDEF NODEBUG
- vbapi2.lib mdllcew.lib libw.lib
- !ELSE
- vbapi2.lib mdllcew.lib libw.lib
- !ENDIF
- $(PRODUCT).def
- <<KEEP
-
- $(PRODUCT).res: $(PRODUCT).rc $(PRODUCT).h *.bmp
- $(SZSCRN) Resource compiling $(PRODUCT).RC
- $(RC) $(RCFLAGS) -R -i$(TOOLS)\inc $(RCINCS) $(PRODUCT).rc
-
- cln:
- -del *.obj
- -del *.res
- -del *.lnk
- -del *.vbx
- -del *.map
- -del *.sym
-